<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>关于窗体</title>
<link rel="stylesheet" type="text/css" href="/css.css" />
<script type="text/javascript" src="/lib/air1.5/AIRAliases.js"></script>
<script type="text/javascript">
	function createWindow(option){
		var transparent = option.transparent || false;
		//also can be none
		var chrome = option.chrome || air.NativeWindowSystemChrome.STANDARD;
		//can be Normal Utility Lightweight
		var type = option.type || air.NativeWindowType.NORMAL;
		var title = option.title || '';
		var width = option.width || 600;
		var height = option.heigth || 400;
		var file = option.file;
		var html = option.html;
		//初始化配置参数
		var options = new air.NativeWindowInitOptions();
		options.transparent = transparent;
		options.systemChrome = chrome;
		options.type = type;
		
		var loader = window.runtime.flash.html.HTMLLoader.createRootWindow(false, options, false);
		if (file) {
			loader.load(new air.URLRequest(file));	
		} else {
			loader.loadString(html || '');
		}
		
		return loader.window.nativeWindow ;
		/*
		//创建窗体
		var newWindow = new air.NativeWindow(options);
		newWindow.title = title;
		newWindow.width = width;
		newWindow.height = height;
		//激活窗体
		newWindow.activate();
		return ;
		*/
	}
function normalWindow(){
	var win = createWindow({
		file:'普通窗体.html'
	});
	win.activate();
		
}
</script>
</head>
<body>
<div class="example" onclick="normalWindow()">
	<img src="\icons\AIRApp_128.png"/>
	<div>普通窗体（系统啥样我啥样）</div>
</div>
<div class="example" >
	<img src="\icons\AIRApp_128.png"/>
	<div>工具窗体（比普通窗体按钮小一些）</div>
</div>
<div class="example">
	<img src="\icons\AIRApp_128.png"/>
	<div>自己定义系统镶边</div>
</div>
<div class="example">
	<img src="\icons\AIRApp_128.png"/>
	<div>嵌入系统桌面</div>
</div>
<div class="example" onclick="window.open('窗体托动及改变大小.html')">
	<img src="\icons\AIRApp_128.png"/>
	<div>窗体托动及改变大小</div>
</div>
<div class="example">
	<img src="\icons\AIRApp_128.png"/>
	<div>综合实例</div>
</div>
</body>
</html>
